package cn.momoshenchi.product.service;

import cn.momoshenchi.product.vo.AttrGroupRelationVo;
import cn.momoshenchi.product.vo.AttrReVo;
import cn.momoshenchi.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.momoshenchi.common.utils.PageUtils;
import cn.momoshenchi.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author ${author}
 * @email ${email}
 * @date 2021-04-23 22:04:06
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long categoryId, String attrType);


    AttrReVo getAttrInfo(Long attrId);

    void updateAttr(AttrReVo attr);

    /**
     * 根据分组Id查询
     * @param attrgroupId
     * @return
     */
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void removeRelation(AttrGroupRelationVo[] vo);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    List<Long> selectSearchAttrs(List<Long> attrIds);
}

